﻿/*----------------------------------------------------------------
    // Copyright (C) 2009 江苏华招网
    // 版权所有。 
    // 作者：吕海乐 
    //
    // 文件名：HospitalCheckedList.aspx.cs
    // 文件功能描述：已审核医疗机构列表
    // 创建标识：吕海乐2009-05-31
    //
    // 修改标识：
    // 修改描述：
    //
    // 修改标识：
    // 修改描述：
    //
    // 审核人：
// 审核时间：
// 审核说明：
 //----------------------------------------------------------------*/
using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HZ.DrugTrade.BLLFactory;
using HZ.DrugTrade.IBLL;
using HZ.DrugTrade.Model;
using HZ.DrugTrade.Model.Enum;

namespace HZ.DrugTrade.Web.Admin.SystemManage
{
    public partial class HospitalCheckedList :  BasePage
    {
        public HospitalCheckedList()
        {
            this.ModuleNo = Module.系统管理.ToString();
            this.PageOperateType = OperateType.医疗机构管理.ToString();

        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindHospitalInfo();
            }
        }

        IBLL_Hospital ih = Factory.BLL_Hospital();

        /// <summary>
        /// 获取所有已通过审核的医疗机构
        /// </summary>
        private void BindHospitalInfo()
        {
            int totalCount;
            //AspNetPager1.PageSize = Constants.GRIDVIEW_PAGE_SIZE;
            Model.Query.HospitalInfo qHospitalInfo = new HZ.DrugTrade.Model.Query.HospitalInfo();
            qHospitalInfo.HospitalName = txtHospitalname.Text.Trim();
            IList<Model.HospitalInfo> lstHospitalInfo = ih.GetRegedHospitalInfo(qHospitalInfo,AspNetPager1.CurrentPageIndex,AspNetPager1.PageSize,out totalCount);
            gvwChildUserList.PageSize = AspNetPager1.PageSize;
            gvwChildUserList.DataSource = lstHospitalInfo;
            gvwChildUserList.DataBind();
        }

        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnQuery_Click(object sender, EventArgs e)
        {
            AspNetPager1.CurrentPageIndex = 1;
            BindHospitalInfo();
        }

        /// <summary>
        /// 翻页
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void AspNetPager1_OnPageChanged(object sender, EventArgs e)
        {
            BindHospitalInfo();
        }
    }
}
